package com.company.test35_01;

import javax.swing.*;

/**
 * Created by v on 16-12-12.
 */
public class TestSwingModel1 {
    public static void main(String[] args) {
        JButton jbt=new JButton();

        ButtonModel model=new DefaultButtonModel();

        model.setActionCommand("OK");
        model.setMnemonic('2');

        jbt.setModel(model);

        System.out.println(jbt.getActionCommand());
        System.out.println(jbt.getMnemonic());
    }
}
